-- GENERATED SPELL FOR [Molten Golem] --


function spell0_28695(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(23113,pUnit)
pUnit:RegisterEvent('Sorts_28695', 6291, 1)
end

function spell1_28695(pUnit, Event) --@Immolation Strike,n/a--
pUnit:FullCastSpellOnTarget(52433,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28695', 9000, 1)
end

function spell2_28695(pUnit, Event) --@Immolation Strike,n/a--
pUnit:FullCastSpellOnTarget(59530,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28695', 9000, 1)
end

function spell3_28695(pUnit, Event) --@Shatter,Self--
pUnit:FullCastSpellOnTarget(52429,pUnit)
pUnit:RegisterEvent('Sorts_28695', 558, 1)
end

function spell4_28695(pUnit, Event) --@Shatter,Self--
pUnit:FullCastSpellOnTarget(59527,pUnit)
pUnit:RegisterEvent('Sorts_28695', 680, 1)
end

function Sorts_28695(pUnit, Event)
local choix_sorts_28695 = math.random(0, 4)
if choix_sorts_28695 == 0 then
pUnit:RegisterEvent('spell0_28695', 1, 1)
end
if choix_sorts_28695 == 1 then
pUnit:RegisterEvent('spell1_28695', 1, 1)
end
if choix_sorts_28695 == 2 then
pUnit:RegisterEvent('spell2_28695', 1, 1)
end
if choix_sorts_28695 == 3 then
pUnit:RegisterEvent('spell3_28695', 1, 1)
end
if choix_sorts_28695 == 4 then
pUnit:RegisterEvent('spell4_28695', 1, 1)
end
end

function mob28695_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28695', math.random(1500, 3000), 1)
end

function mob28695_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28695_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28695_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28695, 1, 'mob28695_Action')
RegisterUnitEvent(28695, 2, 'mob28695_Leave')
RegisterUnitEvent(28695, 3, 'mob28695_Kill')
RegisterUnitEvent(28695, 4, 'mob28695_Die')
